<?php
namespace app\backend\controller;

use think\Controller;

/**
 * Class Index
 * @package app\backend\controller
 * author : wanghu
 */
class Index extends Controller
{
    /**
     * 展示后台首页
     *
     * @return \think\response\View
     * author : wanghu
     */
    public function index()
    {
        if (session('uid')) {
            return view('index');
        } else {
             $this->error('请登录', 'backend/user/login');
        }

    }

    /**
     * 后台欢迎页
     *
     * @return \think\response\View
     * author : wanghu
     */
    public function welcome()
    {
        return view('welcome');
    }

}
